Automattic\WooCommerce\StoreApi\Utilities\CartController D

Total Complexity 133
Dependencies 16
Dependents 5
Total lines 1,343
Lines of code 716
Logical lines of code 304
Comment lines 471
Methods 36
Properties 0

Methods 36

Method Rating Maintainability Complexity Lines of code
parse_variation_data()
A
42 14 51
validate_cart_items()
A
45 10 43
apply_coupon()
A
42 8 61
validate_cart_item()
A
45 9 45
validate_add_to_cart()
A
43 7 53
sanitize_variation_data()
A
49 7 36
add_to_cart()
S
41 4 66
get_shipping_packages()
S
54 6 21
stock_exceptions_to_wp_errors()
S
49 5 36
validate_cart_coupons()
S
53 5 23
get_error_message_for_stock_exception_type()
S
46 3 51
set_cart_item_quantity()
S
56 4 16
get_cart_errors()
S
60 4 13
get_variable_product_attributes()
S
60 4 13
validate_cart()
S
53 3 25
filter_request_data()
S
55 3 20
get_product_for_cart()
S
62 3 11
validate_cart_coupon()
S
59 2 16
load_cart()
S
73 3 5
get_cart_instance()
S
67 3 7
get_package_name()
S
61 2 13
get_variation_id_from_variation_data()
S
60 2 13
get_cart_coupons()
S
74 2 4
get_product_id()
S
78 2 3
add_product_names_to_message()
S
66 2 8
get_cart_item()
S
74 2 4
get_variation_id()
S
79 2 3
get_cart_items()
S
74 2 4
select_shipping_rate()
S
69 2 6
get_product_quantity_in_cart()
S
70 2 6
calculate_totals()
S
70 1 7
get_remaining_stock_for_product()
S
72 1 5
throw_default_product_exception()
S
66 1 10
get_cart_hashes()
S
63 1 10
empty_cart()
S
77 1 4
has_coupon()
S
76 1 4